#LibPath "Lib"
#Include "win\winnt.bi"
#include "win\iphlpapi.bi"
#Include "win\tlhelp32.bi"
#Include "Win\Psapi.bi"
#Include "Inc\SDK\xrtl.bi"
#Include "Inc\SDK\xywhBSMM.bi"
#Include "Inc\SDK\xBuffer.bi"
#Include "Inc\SDK\CrypToHash.bi"
#Include "Inc\SDK\Atom.bi"
#Include "Inc\SDK\wait.bi"
#Include "Inc\SDK\xWindow.bi"



#Include "Inc\MOD\Base.bi"
#Include "Inc\MOD\Charset.bi"
#Include "Inc\MOD\Atom.bi"
#Include "Inc\MOD\Window.bi"
#Include "Inc\MOD\Socket.bi"



Sub xTaskLib_Init()
	NtQueryInformationProcess = Cast(Any Ptr, GetProcAddress(GetModuleHandle("ntdll"), "NtQueryInformationProcess"))
End Sub



#If __FB_OUT_DLL__
	Function DllMain Alias "DllMain" (hinstDLL As HINSTANCE, fdwReason As DWORD, lpvReserved As LPVOID) As BOOL
		Select Case fdwReason
			Case DLL_PROCESS_ATTACH
				xTaskLib_Init()
			Case DLL_PROCESS_DETACH
				
			Case DLL_THREAD_ATTACH
				
			Case DLL_THREAD_DETACH
				
		End Select
		Return 1
	End Function
#Else
	xTaskLib_Init()
	
	
	
	'Print GetParentByProcessID(12116)
	'Print GetParentByProcessID(14692)
	'Print xFindChildProcessID(16520)
	
	Print *Cast(ZString Ptr, xRtl.Charset.W2A(xGetWindowFilePath(Cast(HWND, 6162266))))
	
	
	
	Sleep
#EndIf
